<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/Mock.js/1.0.0/mock-min.js"></script>
</head>
<body>
   <h1>testMockAjax</h1> 
     <!-- 第二种 -->
   <script>MOCK = 'true'</script>
   <!-- 第一种删除Mock。注释掉 -->
   <script src="./mock/testMock.js"></script>
 
   <script>
       $.ajax({
           url:'/testmcokajax2',
           type: 'get',
           dataType: 'json',
           success:(data)=>{
               console.log(data)
           }
       })
   </script>
</body>
</html>